﻿using System;
using System.Linq;
using VisitorExample.Fruits;

namespace ObserverExample
{
    class Program
    {
        static void Main(string[] args)
        {
            var obs = new FruitObserver();

            var ban = new Banana();
            ban.Register(obs);
            ban.Price = 1.55d;

            var ap = new Apple();
            ap.Register(obs);
            ap.Price = 0.45d;

            Console.ReadLine();
        }
    }
}
